#!/usr/bin/env python3
"""
Simple data science script to analyze employee data.
"""

import pandas as pd
import sys

def main():
    # Load the CSV data
    df = pd.read_csv('data/employees.csv')
    
    print("Employee Data Analysis")
    print("=" * 30)
    
    # Display basic info
    print(f"\nDataset shape: {df.shape}")
    print(f"\nColumns: {list(df.columns)}")
    
    # Display first few rows
    print(f"\nFirst 5 rows:")
    print(df.head())
    
    # Basic statistics
    print(f"\nBasic Statistics:")
    print(df.describe())
    
    # Department analysis
    print(f"\nDepartment distribution:")
    dept_counts = df['department'].value_counts()
    print(dept_counts)
    
    # Average salary by department
    print(f"\nAverage salary by department:")
    avg_salary = df.groupby('department')['salary'].mean().round(2)
    print(avg_salary)
    
    # Age analysis
    print(f"\nAge statistics:")
    print(f"Average age: {df['age'].mean():.1f}")
    print(f"Age range: {df['age'].min()} - {df['age'].max()}")

if __name__ == "__main__":
    main()